#ifndef __Core_LogService_h__
#define __Core_LogService_h__

#include "Core/Service.h"
#include "Core/Kernel.h"

//#define LOG_MSG(x) INST<LogService>()->logMessage(x, LogService::MESSAGE)
//#define LOG_WRN(x) INST<LogService>()->logMessage(x, LogService::WARNING)
//#define LOG_ERR(x) INST<LogService>()->logMessage(x, LogService::ERROR)

namespace Orca {

	//--------------------------------------------------------------------------
	class LogService : public Service {

		ORCA_DECLARE_SERVICE()

	public:
		virtual ~LogService() {}

		enum MODE {

			MESSAGE,
			WARNING,
			ERROR,
		};

		virtual void logMessage(const Str &str, MODE mode) = 0;

	protected:
	};

	inline void LOG_MSG(const Str &x) {INST<LogService>()->logMessage(x, LogService::MESSAGE);}
	inline void LOG_WRN(const Str &x) {INST<LogService>()->logMessage(x, LogService::WARNING);}
	inline void LOG_ERR(const Str &x) {INST<LogService>()->logMessage(x, LogService::ERROR);}
}

#endif	// __Core_LogService_h__